﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="mis_function.aspx.cs" Inherits="mis_function" %>
<%@ Register src="~/UserControls/ucFavorite.ascx" tagname="ucFavorite" tagprefix="Kerry" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <table>
        <tr>
            <td>
                <asp:Panel ID="PanelTV" runat="server" GroupingText="選單列表">
                    <asp:TreeView ID="treeview_function" runat="server"
                        OnSelectedNodeChanged="treeview_function_SelectedNodeChanged"
                        ShowLines="True">
                    </asp:TreeView>
                </asp:Panel>
            </td>
            <td>
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/permission.jpg" />
                <br/>
                <table class="ConditionTable">
                    <th><Kerry:ucFavorite ID="ucFavorite" runat="server"/>功能授權設定</td>功能選單設定</th>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td colspan="4">
                                        <asp:Button ID="btnAddRoot" runat="server" Text="新增Root" OnClick="btnAddRoot_Click"></asp:Button>
                                        <asp:Button ID="btnAddChild" runat="server" Text="新增Child" OnClick="btnAddChild_Click"></asp:Button>
                                        <asp:Button ID="btnUpdate" runat="server" Text="修改" OnClick="btnUpdate_Click"></asp:Button>
                                        <asp:Button ID="btnDelete" runat="server" Text="刪除" OnClick="btnDelete_Click" CausesValidation="False"></asp:Button>
                                        <asp:Button ID="btnRefresh" runat="server" Text="重新整理" OnClick="btnRefresh_Click" CausesValidation="False"></asp:Button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="lbl_id" runat="server" Text="Function ID" />
                                    </td>
                                    <td>
                                        <asp:Label ID="lbl_function_id" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="lbl_name" runat="server" Text="名稱"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txt_function_name" runat="server"/>
                                        <asp:RequiredFieldValidator ID="RVName" runat="server" 
                                            ControlToValidate="txt_function_name" Display="Dynamic" 
                                            ErrorMessage="不能空白" ForeColor="Red" SetFocusOnError="True"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="lbl_type" runat="server" Text="Type" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddl_type_list" runat="server">
                                            <asp:ListItem Value="MENU">選單</asp:ListItem>
                                            <asp:ListItem Value="FUNCTION">功能</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:Label ID="lbl_parent" runat="server" Text="PARENT ID " />
                                        <asp:TextBox ID="txt_parent_id" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>排序</td>
                                    <td>
                                        <asp:TextBox ID="txt_sort_order" runat="server" Width="55px" Text="0" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="lbl_path" runat="server" Text="URL PATH" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txt_navigate_url" runat="server" Width="90%" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="lbl_terget" runat="server" Text="Target" />
                                    <td>
                                        <asp:DropDownList ID="ddl_target" runat="server">
                                            <asp:ListItem>None</asp:ListItem>
                                            <asp:ListItem>_blank</asp:ListItem>
                                            <asp:ListItem>_parent</asp:ListItem>
                                            <asp:ListItem>_self</asp:ListItem>
                                            <asp:ListItem>_top</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="lbl_isdefault" runat="server" Text="是否預設權限" />
                                    <td>
                                        <asp:DropDownList ID="ddl_isdefault" runat="server">
                                            <asp:ListItem>Y</asp:ListItem>
                                            <asp:ListItem>N</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Label ID="lbl_message" runat="server" ForeColor="Blue" EnableViewState="False" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>

